const pie = function (options) {
  return {
    title: [{
      text: options.allAlarm,
      x: 'center',
      y: '35%',
      textStyle: {
          fontSize: 20,
          fontWeight: 'normal',
          fontStyle: 'normal',
          color: '#333333'
      }
  }, {
      text: '报警次数',
      x: 'center',
      y: '50%',
      textStyle: {
          fontSize: 14,
          fontWeight: 'normal',
          fontStyle: 'normal',
          color: '#949494'
      }
  }],
  grid: {
    containLabel: true
  },
    series: [
      {
        name: '',
        type: 'pie',
        radius: ['40%', '60%'],
        center: ['50%', '50%'],
        itemStyle: {
          borderWidth: 1,
          borderColor: '#fff',
        },
        data: options.data,
        color: options.color,
        label: {
          formatter:'{b|{b}, }{d|{c}}',  //'{b|{b}, }{d|{c}}'
          rich: {
            b: {
              fontSize: 11,
              color: '#949494',
              align: 'center'
            },
            d: {
              fontSize: 13,
              color: '#333',
              align: 'left'
            }
          }
        }
      }
    ]
  }
};

export default pie
